package juc.java8;
@FunctionalInterface
public interface DefaultDemo {
    double calculate(int a);
    default double calculate2(int a){
        return 0.1;
    };
    default double sqrt(int a) {
        return Math.sqrt(a);
    }

    public static void main(String[] args) {
        DefaultDemo defaultDemo = new DefaultDemo() {
            @Override
            public double calculate(int a) {
                return 0;
            }

            @Override
            public double sqrt(int a) {
                return 0;
            }
        };

        System.out.println(defaultDemo.sqrt(100));

    }

}
